package com.asset.admin.system.syemenu.enums;

/**
 * <p>
 * todo 描述
 * </p>
 *
 * @author 牧之
 * @date 2024/8/5 00:48
 */
public enum EnumEnableStatus {
    ENABLE(1, "启用","enable"),
    DISABLE(0, "禁用","disable");

    private Integer code;
    private String desc;
    private String value;
    
    public static EnumEnableStatus getEnumByCode(Integer code) {
        for (EnumEnableStatus e : EnumEnableStatus.values()) {
            if (e.getCode().equals(code)) {
                return e;
            }
        }
        return null;
    }

    public static Integer getCodeByValue(String value) {
        for (EnumEnableStatus e : EnumEnableStatus.values()) {
            if (e.getValue().equals(value)) {
                return e.getCode();
            }
        }
        return null;
    }

    EnumEnableStatus(Integer code, String desc, String value) {
        this.code = code;
        this.desc = desc;
        this.value = value;
    }

    public Integer getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }
    
    
    public String getValue() {
        return value;
    }
}
